package com.lanxin.oa.zu.service;

import com.lanxin.bean.*;
import com.lanxin.util.PageBean;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface KehuService {
    //查询产品
    PageBean selectcp(Integer page, Integer pageSize, String linkname);
    //通过id查询产品
    KhProduct selectcpByid(Integer oid);
    //添加产品
    void insertcp(KhProduct cp,HttpServletRequest request,MultipartFile imgfile);
    //通过名字查询该产品是否存在
    boolean selectcpByName(String linkname,Integer oid);
    //上传
    String upload(HttpServletRequest request, MultipartFile accpath);
    //删除
    boolean deletecp(KhProduct cp);
    ///////////////////////////客户////////////////////////////////////
    //查询客户
    PageBean selectkh(Integer page, Integer pageSize, String customerName, String phone, Integer companyType, Integer vocation);
    //查询公司性质
    List selectxz();
    //查询各个行业
    List selecthy();
    //查询信用
    List selectxy();
    //添加客户
    void insertkehu(KhCustomer kh, String[] contactName, String[] job, String[] cphone, String[] cemail, String[] czipcode, String[] caddress );
    //通过id查询客户
    KhCustomer selectkhById(Integer oid);
    //修改客户
    void updatekehu(KhCustomer kh,Integer[] coid, String[] contactName, String[] job, String[] cphone, String[] cemail, String[] czipcode, String[] caddress );
    //查询客户关心的产品
    PageBean selectkhgxcp(Integer customerid, Integer page, Integer pageSize);
    //查询产品
    List selectcp();
    //添加客户关心的产品
    void insertgxcp(KhCustomerfavorite gx);
    //通过名字查询该产品是否被该客户关心了
    boolean guanxin(Integer customerid,Integer productid);
    //修改客户关心的产品
    void updateguanxin(KhCustomerfavorite gx);
     //查询客户的客户联系人
    List selectlxr(Integer oid);
    //添加跟踪
    void insertgenzong(KhContactrecord gz);
    //查询客户的跟踪记录
    PageBean selectgzjl(Integer oid,Integer page,Integer pageSize);
}
